Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class com.pacist.diamonds.Slider

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Canvas
              |
              +--com.pacist.diamonds.DiamondCanvas
                    |
                    +--com.pacist.diamonds.Controller
                          |
                          +--com.pacist.diamonds.LinearController
                                |
                                +--com.pacist.diamonds.Slider

public class Slider
extends LinearController
A component implementing a slider. It can be used for the display or entry of numeric values.

See Also:
Serialized Form

Fields inherited from class com.pacist.diamonds.LinearController
hasPeer, HORIZONTAL, orientation, thumbSize, trackRect, valueRect, VERTICAL
 
Fields inherited from class com.pacist.diamonds.Controller
canMeasure, listeners, maxValue, minValue, postOnMouseDown, postWhileDragging, showValue, value
 
Fields inherited from class com.pacist.diamonds.DiamondCanvas
tipText
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
Slider()
          Creates and initializes a Slider object with a minimum value of 0, a maximum value of 100, an initial value of 0, and a horizontal orientation.
Slider(int min, int max, int initial, int o)
          Creates and initializes a Slider object with the specified minimum, maximum, initial, and orientation values.
 
Method Summary
java.awt.Rectangle getThumbRect()
           
void paintThumb(java.awt.Graphics g)
          Draws the thumb of the slider.
void paintTrack(java.awt.Graphics g)
          Draws the track of the slider.
void repaintPostValueChange(java.awt.Rectangle oldThumb, java.awt.Rectangle newThumb)
           
 
Methods inherited from class com.pacist.diamonds.LinearController
addNotify, doValueAtEndLayout, getMinimumSize, getOrientation, getPreferredSize, getThumbRect, getTrackRect, getValueColor, getValuePos, getValueRect, layoutAreas, minimumSize, paint, paintThumb, paintTrack, paintValue, paintValueOneColor, pointToValue, preferredSize, repaintPostValueChange, setBounds, setOrientation, setValue, valueToX
 
Methods inherited from class com.pacist.diamonds.Controller
addControllerListener, getMaxValue, getMinValue, getPostOnMouseDown, getShowValue, getValue, getValueString, isMaxAtBottom, mouseDragged, mousePressed, mouseReleased, notifyValueChange, pinValue, pointToValue, processMouseEvent, processMouseMotionEvent, removeControllerListener, setMaxAtBottom, setMaxValue, setMinValue, setPostOnMouseDown, setShowValue, setValue
 
Methods inherited from class com.pacist.diamonds.DiamondCanvas
getTipText, mouseEnter, mouseExit, processMouseEvent, setTipText
 
Methods inherited from class java.awt.Canvas
addNotify, paint
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paint, paramString, postEvent, preferredSize, prepareImage, prepareImage, printAll, print, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Constructor Detail

Slider

public Slider()
Creates and initializes a Slider object with a minimum value of 0, a maximum value of 100, an initial value of 0, and a horizontal orientation.

Slider

public Slider(int min,
              int max,
              int initial,
              int o)
Creates and initializes a Slider object with the specified minimum, maximum, initial, and orientation values.
Parameters:
min - the minimum value of the slider.
max - the maximum value of the slider.
initial - the initial value of the slider.
o - the orientation of the slider.
Method Detail

repaintPostValueChange

public void repaintPostValueChange(java.awt.Rectangle oldThumb,
                                   java.awt.Rectangle newThumb)
Overrides:
repaintPostValueChange in class LinearController

paintTrack

protected void paintTrack(java.awt.Graphics g)
Draws the track of the slider. Override to provide a different look to the slider.
Parameters:
g - The Graphics with which to draw.
Overrides:
paintTrack in class LinearController

paintThumb

protected void paintThumb(java.awt.Graphics g)
Draws the thumb of the slider. Override to provide a different look to the slider.
Parameters:
g - The Graphics with which to draw.
Overrides:
paintThumb in class LinearController

getThumbRect

protected java.awt.Rectangle getThumbRect()
Overrides:
getThumbRect in class LinearController

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD